﻿

namespace Mulala.Cavan.Domain.MainBoundedContext.SearchModule
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Mulala.Cavan.Domain.MainBoundedContext.CorporationModule;

    public static class CorporationSearchFactory
    {
        public static CorporationSearch CreateCorporationSearch(CorporationIdentifier.CorporationType type,
            int businessExperience, int scale, IDictionary<string, bool> orderBy, int currentPage, int maxRowsPerPage)
        {
            CorporationSearch search = new CorporationSearch();
            search.Type = type;
            search.BusinessExperience = businessExperience;
            search.Scale = scale;
            search.OrderBy = orderBy;
            search.CurrentPage = currentPage;
            search.MaxRowsPerPage = maxRowsPerPage;

            return search;
        }

        public static CorporationSearch CreateCorporationSearch(bool isSystemRecommend,int minScore, int maxScore, IDictionary<string, bool> orderBy, int currentPage, int maxRowsPerPage)
        {
            CorporationSearch search = new CorporationSearch();
            search.IsSystemRecommend = isSystemRecommend;
            search.MinScore = minScore;
            search.MaxScore = maxScore;
            search.OrderBy = orderBy;
            search.CurrentPage = currentPage;
            search.MaxRowsPerPage = maxRowsPerPage;

            return search;
        }

        public static CorporationSearch CreateCorporationSearch(IDictionary<string, bool> orderBy, int currentPage, int maxRowsPerPage)
        {
            CorporationSearch search = new CorporationSearch();
            search.OrderBy = orderBy;
            search.CurrentPage = currentPage;
            search.MaxRowsPerPage = maxRowsPerPage;

            return search;
        }

        public static CorporationSearch CreateCorporationSearch(CorporationIdentifier.CorporationType? type, int businessExperience,
            string areaCode, int scale, int[] SkillPosition, IDictionary<string, bool> orderBy, int currentPage, int maxRowsPerPage)
        {
            CorporationSearch search = new CorporationSearch();
            search.Type = type;
            search.BusinessExperience = businessExperience;
            search.AreaCode = areaCode;
            search.Scale = scale;
            search.SkillPosition = SkillPosition;
            search.OrderBy = orderBy;
            search.CurrentPage = currentPage;
            search.MaxRowsPerPage = maxRowsPerPage;

            return search;
        }

        public static CorporationSearch CreateCorporationSearch(int minScore, int maxScore, IDictionary<string, bool> orderBy, int currentPage, int maxRowsPerPage)
        {
            CorporationSearch search = new CorporationSearch();
            search.MinScore = minScore;
            search.MaxScore = maxScore;
            search.OrderBy = orderBy;
            search.CurrentPage = currentPage;
            search.MaxRowsPerPage = maxRowsPerPage;

            return search;
        }

        public static CorporationSearch CreateCorporationSearch(CorporationIdentifier.OnLineStatus onLineStatus)
        {
            CorporationSearch search = new CorporationSearch();
            search.OnLineStatus = onLineStatus;

            return search;
        }
    }
}
